home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
os2
/
adaptor.zip
/
ADAPT.ZIP
/
adaptor
/
examples
/
dalib
/
move
/
simple3.f
< prev
next >
Wrap
Text File
|
1993-03-23
|
1KB
|
44 lines
program move
real ha(5,5), a(5,5), b(6,6), c(5,5)
cmf$ layout ha(:host)
integer i
a = 1
forall (j=1:6, i=1:6) b(i,j) = i + j
a(2:4,1:3) = b(4:6,3:5)
ha = a
do i = 1, 5
print 5, ha(i,:)
end do
print *, ' '
c 1 1 1 1 1
c 7 8 9 1 1
c 8 9 10 1 1
c 9 10 11 1 1
c 1 1 1 1 1
print *, 'Results should be '
print *, ' 1 1 1 1 1'
print *, ' 7 8 9 1 1'
print *, ' 8 9 10 1 1'
print *, ' 9 10 11 1 1'
print *, ' 1 1 1 1 1'
a(1:5,1:3) = b(1:5,3:5)
a(3:2,1:3) = b(3:2,2:4)
ha = a
do i = 1, 5
print 5, ha(i,:)
end do
print *, ' '
c 4 5 6 1 1
c 5 6 7 1 1
c 6 7 8 1 1
c 7 8 9 1 1
c 9 10 11 1 1
print *, 'Results should be '
print *, ' 4 5 6 1 1'
print *, ' 5 6 7 1 1'
print *, ' 6 7 8 1 1'
print *, ' 7 8 9 1 1'
print *, ' 8 9 10 1 1'
5 FORMAT (5F10.5)
end